package com.rqbl.service.impl;

import com.rqbl.entity.Interest;
import com.rqbl.mapper.InterestMapper;
import com.rqbl.myutils.Transfer;
import com.rqbl.service.InterestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bruce
 * @since 2024-07-19
 */
@Service
public class InterestServiceImpl implements InterestService {

    @Autowired
    private InterestMapper interestMapper;

    @Override
    public List<Transfer> getAllInterestLabels() {
        List<Interest> list = interestMapper.selectAllInterest();
        return list.stream().map(item ->
                new Transfer(item.getIid().toString(), item.getItype())).collect(java.util.stream.Collectors.toList());
    }
}
